#
# Copyright (c) 2021 Carlo Caione <ccaione@baylibre.com>
# Copyright 2024-2025 NXP
#
# SPDX-License-Identifier: Apache-2.0
#

cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})

if(CONFIG_INCLUDE_REMOTE_DIR)
set(REMOTE_ZEPHYR_DIR ${CMAKE_CURRENT_BINARY_DIR}/../remote/zephyr)
endif()

if(NOT (CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP OR
        CONFIG_BOARD_NRF5340BSIM_NRF5340_CPUAPP OR
        CONFIG_BOARD_LPCXPRESSO55S69_LPC55S69_CPU0 OR
        CONFIG_BOARD_MIMXRT1160_EVK_MIMXRT1166_CM7 OR
        CONFIG_BOARD_MIMXRT1170_EVK_MIMXRT1176_CM7 OR
        CONFIG_BOARD_MIMXRT700_EVK_MIMXRT798S_CM33_CPU0 OR
        CONFIG_BOARD_FRDM_MCXN947_MCXN947_CPU0 OR
        CONFIG_BOARD_MCX_N9XX_EVK_MCXN947_CPU0 OR
        CONFIG_BOARD_MIMXRT1180_EVK_MIMXRT1189_CM33 OR
        CONFIG_BOARD_EK_RA8P1_R7KA8P1KFLCAC_CM85
       )
  )
  message("${BOARD} is not supported for this sample")
endif()


project(ipc_service)

if(CONFIG_INCLUDE_REMOTE_DIR)
  target_include_directories(zephyr_interface
    INTERFACE ${REMOTE_ZEPHYR_DIR}/include/public)
endif()

target_sources(app PRIVATE src/main.c)

include(ExternalProject)
